TemplateListener

The listener interface for receiving lifecycle and interaction events related to a Template instance.

A class that is interested in processing such template events implements this interface. An object created from that class (a listener instance) is then registered with the component that manages the template's lifecycle (e.g., a specific TemplateView or a template controller) using a method like addTemplateListener(TemplateListener listener).

When a significant event occurs for the template (such as initialization, suspension, resumption, termination, or a user interaction like a click), the corresponding method in the registered listener object is invoked. This allows applications to react to changes in the template's state or to user interactions with the template.

See also

Functions

Link copied to clipboard
abstract fun onClicked()
Invoked when a user interaction, typically a click or touch event, occurs on the associated template or a specific interactive element within it.
Link copied to clipboard
abstract fun onInitialized()
Invoked when the associated template has been fully initialized and is ready for interaction or display.
Link copied to clipboard
abstract fun onResumed()
Invoked when a previously suspended template is resumed and becomes active again.
Link copied to clipboard
abstract fun onSuspended()
Invoked when the associated template is temporarily suspended or paused.
Link copied to clipboard
abstract fun onTerminated()
Invoked when the associated template is permanently terminated and its resources are about to be released.